import request from '@configs/request.config'


// 获取视频列表
export const getVideoList = function (data) {
  return request('get', `${process.env.BASE_DOMAIN}/video/list/service`, data)
}

// 获取视频详情
export const getVideoDetail = function (data) {
  return request('get', `${process.env.BASE_DOMAIN}/video/get/service`, data)
}

// 获取视频分类
export const getVideoCategory = function (data) {
  return request('get', `${process.env.BASE_DOMAIN}/video/category/list/service`, data)
}

// 获取视频一级二级分类
export const getVideoAllCategory = function (data) {
  return request('get', `${process.env.BASE_DOMAIN}/video/category/list-all-by-level/service`, data)
}

// 微信用户信息
export const getWxUserInfo = function (data) {
  return request('get', `${process.env.BASE_DOMAIN}/wechat/oauth2/getUserInfoByCode`, data)
}
// 用户是否是第一次绑定openid
export const isFirstBind = function (data) {
  return request('get', `${process.env.BASE_DOMAIN}/wechat/scan/record/is-exist-first-record-by-openid`, data)
}
// 根据openid校验 用户是否注册
export const alreadyRegister = function (openid) {
  return request('get', `${process.env.BASE_DOMAIN}/v1/tri/members/openid/${openid}`, {})
}
// 用户注册
export const register = function (data) {
  return request('post', `${process.env.BASE_DOMAIN}/v1/tri/member`, data)
}